package Lim;

import static java.lang.Math.E;

public class question1 {

    public static void main(String[] args) {
//        sinx(1);
//      ex(0.1);
        e(0.000001);
    }
    //计算lim x->0  sinx/x
    private static void sinx(double x){
         double result;
        for (double i = x; i >=0; i=i-0.1) {
            result=Math.sin(i)/i;
            System.out.println(result);
        }

    }
//    计算lim x->0 e^x-1/x
    private static void ex(double x){
        double result;
        for (double i = x; i >=0; i=i-0.01) {
            result=(Math.pow(E, i)-1)/i;
            System.out.println(result);
        }
    }

    //计算lim x->0(1+x)^1/x
    private static void e(double x){
        double result;
        for (double i = x; i >=0.0000001 ; i=i-0.0000001) {
            result=Math.pow(1+i,1/i);
            System.out.println(result);
        }
        System.out.println("-----------");
        System.out.println(E);
    }
}
